package 异常处理;

import java.util.Scanner;

class IllegalTriangleException extends Exception{
    String message;

    public IllegalTriangleException(double s1, double s2, double s3) {
        message = "Invalid: "+s1+","+s2+","+s3;
    }

    public String getMessage(){
        return message;
    }

}

class Triangle {
    double side1;
    double side2;
    double side3;

    public Triangle(double side1, double side2, double side3) throws IllegalTriangleException{
        this.side1 = side1;
        this.side2 = side2;
        this.side3 = side3;

        if((side1+side2)<=side3 || (side2+side3)<=side1 || (side3+side1)<=side2){
            throw new IllegalTriangleException(side1,side2,side3);
        }

    }
    public String toString(){

        return "Triangle [side1=" + side1 + ", side2=" + side2 + ", side3=" + side3 + "]";
    }
}
public class 三角形 {
    public static void main(String[] args) {

        Scanner input = new Scanner(System.in);

        double s1 = input.nextDouble();
        double s2 = input.nextDouble();
        double s3 = input.nextDouble();

        try {
            Triangle t = new Triangle(s1,s2,s3);
            System.out.println(t.toString());
        }
        catch (IllegalTriangleException ex) {
            System.out.println(ex.getMessage());

        }

    }
}
